home *** CD-ROM | disk | FTP | other *** search
/ Personal Computer World 2007 September / PCWSEP07.iso / Software / Linux / Linux Mint 3.0 Light / LinuxMint-3.0-Light.iso / casper / filesystem.squashfs / var / lib / dpkg / info / cupsys.prerm < prev    next >
Encoding:
Text File  |  2007-04-04  |  1.8 KB  |  75 lines

  1. #! /bin/sh
  2. # prerm script for cupsys
  3. #
  4. # see: dh_installdeb(1)
  5.  
  6. set -e
  7.  
  8. # summary of how this script can be called:
  9. #        * <prerm> `remove'
  10. #        * <old-prerm> `upgrade' <new-version>
  11. #        * <new-prerm> `failed-upgrade' <old-version>
  12. #        * <conflictor's-prerm> `remove' `in-favour' <package> <new-version>
  13. #        * <deconfigured's-prerm> `deconfigure' `in-favour'
  14. #          <package-being-installed> <version> `removing'
  15. #          <conflicting-package> <version>
  16. # for details, see http://www.debian.org/doc/debian-policy/ or
  17. # the debian-policy package
  18.  
  19.  
  20. case "$1" in
  21.     remove)
  22.     (cd /usr/lib/cups/backend && rm -f http ipp lpd parallel scsi serial socket usb snmp)
  23.         if [ -L /usr/lib/cups/backend/smb ]; then
  24.             rm -f /usr/lib/cups/backend/smb 2>/dev/null || true
  25.         fi
  26.     if [ -L /usr/share/ppd/1-local-admin ]; then
  27.       rm -f /usr/share/ppd/1-local-admin
  28.     fi
  29.     if [ -L /usr/share/ppd/2-third-party ]; then
  30.       rm -f /usr/share/ppd/2-third-party
  31.     fi
  32.         ;;
  33.     upgrade|deconfigure)
  34.         ;;
  35.     failed-upgrade)
  36.         ;;
  37.     *)
  38.         echo "prerm called with unknown argument \`$1'" >&2
  39.         exit 1
  40.     ;;
  41. esac
  42.  
  43. # dh_installdeb will replace this with shell code automatically
  44. # generated by other debhelper scripts.
  45.  
  46. # Automatically added by dh_installdocs
  47. if [ "$1" = remove ] || [ "$1" = upgrade ] && \
  48.    which install-docs >/dev/null 2>&1; then
  49.     install-docs -r cupsys
  50. fi
  51. # End automatically added section
  52. # Automatically added by dh_installinit
  53. if [ -x "/etc/init.d/cupsys" ]; then
  54.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  55.         invoke-rc.d cupsys stop || exit $?
  56.     else
  57.         /etc/init.d/cupsys stop || exit $?
  58.     fi
  59. fi
  60. # End automatically added section
  61. # Automatically added by dh_usrlocal
  62. (
  63.     while read dir; do
  64.         rmdir "$dir" 2>/dev/null || true
  65.     done
  66. ) << DATA
  67. /usr/local/share/ppd
  68. DATA
  69. # End automatically added section
  70.  
  71.  
  72. exit 0
  73.  
  74.  
  75.